#include "PrecompiledHeader.h"
#include "RenderTask.h"

/*--------------------------------------------------------------------------*/

RenderTask::RenderTask(const RenderTaskDesc& renderTaskDesc) :
	m_argument(renderTaskDesc.m_argument),
	m_flags(renderTaskDesc.m_flags),
	m_material(renderTaskDesc.m_material),
	m_object(renderTaskDesc.m_object),
	m_priority(renderTaskDesc.m_priority)
{
	AssertLogC(this->m_object == NULL, "NULL object in RenderTask detected!");
	AssertLogC(this->m_material == NULL && !(m_flags & ERenderTaskFlag::NoMaterial), "NULL material in RenderTask detected!");
}

/*--------------------------------------------------------------------------*/

RenderTask::~RenderTask()
{

}

/*--------------------------------------------------------------------------*/

const Material* RenderTask::GetMaterial() const
{
	return this->m_material;
}

/*--------------------------------------------------------------------------*/

IRender* RenderTask::GetObject() const
{
	return this->m_object;
}

/*--------------------------------------------------------------------------*/

uint RenderTask::GetArgument() const
{
	return this->m_argument;
}

/*--------------------------------------------------------------------------*/

uint RenderTask::GetPriority() const
{
	return this->m_priority;
}

/*--------------------------------------------------------------------------*/

uint RenderTask::GetFlags() const
{
	return this->m_flags;
}

/*--------------------------------------------------------------------------*/

void RenderTask::SetPriority(uint priority)
{
	this->m_priority = priority;
}

/*--------------------------------------------------------------------------*/
